package net.service.Impl;

import net.mapper.UserMapper;
import net.pojo.User;
import net.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @Author admin
 * @Date 2019/5/23 8:16
 */

@Service
@Transactional
public class UserServiceImpl implements UserService {
    @Autowired
    UserMapper userMapper;

    @Override
    public User Login(User user) {
        return userMapper.Login(user);
    }

    @Override
    public int regist(User user) {
        return userMapper.regist(user);
    }

    @Override
    public int checkUserName(String username) {
        return userMapper.checkUserName(username);
    }

    @Override
    public User findById(Integer uid) {
        return userMapper.findById(uid);
    }

    @Override
    public int updatePassword(User user) {
        return userMapper.updatePassword(user);
    }
}
